import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBApplication.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBModule/YBHomePage/YBMapMiShuPage/YBMapMiShuProvider/YBMapMiShuEventBus.dart';

class YBMapMiShuHuJiaoHeaderPage extends StatefulWidget {
  @override
  _YBMapMiShuHuJiaoHeaderPageState createState() => _YBMapMiShuHuJiaoHeaderPageState();
}

class _YBMapMiShuHuJiaoHeaderPageState extends State<YBMapMiShuHuJiaoHeaderPage> {

  String hangYeStr;

  String diStr;

  String gaoStr;

  String miaoShuStr;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    eventBus.on<YBMapMiShuHangYeEventBus>().listen((event) {
      hangYeStr = event.hangYeStr;
    });

    eventBus.on<YBMapMiShuYuSuanEventBus>().listen((event) {
        diStr = event.diStr;
        gaoStr = event.gaoStr;
    });

    eventBus.on<YBMapMiShuMiaoShuEventBus>().listen((event) {
        miaoShuStr = event.miaoShuStr;
    });

  }

  @override
  Widget build(BuildContext context) {



    return Container(
      decoration: BoxDecoration(
        borderRadius: BorderRadius.only(topLeft: Radius.circular(8.0),topRight: Radius.circular(8.0)),
        color: YBColor.white,
      ),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: [
          Container(
            height: 12,
          ),
          Container(
            child: Padding(
              padding: EdgeInsets.only(left: 20),
              child: Stack(
                children: [
                  Container(
                    child: Padding(
                      padding: EdgeInsets.only(top: 10),
                      child: Container(
                        color: YBColor.commonThemeColor,
                        height: 10,
                        width: 58,
                      ),
                    ),
                  ),
                  Container(
                    child: Text(
                      '下单信息',
                      style: YBTextStyle.TextStyle18181815Medium,
                    ),
                  ),
                ],
              ),
            ),
          ),
          Container(
            height: 8,
          ),
          Container(
            height: 56,
            child: InkWell(
              child: Container(
                child: Padding(
                  padding: EdgeInsets.only(left: 20,right: 20),
                  child: Row(
                    children: [
                      Container(
                        child: Image.asset(YBImageStyle.getImagePath('lawyerImage_shiwuimage')),
                      ),
                      Container(
                        width:8,
                      ),
                      Expanded(
                        child: Text(
                          '办事事务',
                          style: YBTextStyle.TextStyle48484814,
                        ),
                      ),

                      Container(
                        child: Text(
                          "1项",
                          style: YBTextStyle.TextStyle48484814,
                        ),
                      ),
                      Container(
                        width: 12,
                      ),
                      Container(
                        child: Image.asset(YBImageStyle.getImagePath('findIconArrowRight')),
                      ),
                    ],
                  ),
                ),
              ),
              onTap: () async {
                YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage/homePagesShangWuFaLxXingZhengMiShuBanLiShiWuPage');
              },
            ),
          ),
          Container(
            child: Padding(
              padding: EdgeInsets.only(left: 20,right: 20),
              child: Container(
                height: 1,
                color: YBColor.colorF5F5F7,
              ),
            ),
          ),
          Container(
            height: 56,
            child: Padding(
              padding: EdgeInsets.only(left: 20),
              child: Row(
                children: [
                  Container(
                    child: Image.asset(YBImageStyle.getImagePath('lawyerimage_jiedanrenshu')),
                  ),
                  Container(
                    width: 8,
                  ),
                  Container(
                    child: Text(
                      '接单人数',
                      style: YBTextStyle.TextStyle48484814,
                    ),
                  ),
                ],
              ),
            ),
          ),
          Container(
            height: 8,
            color: YBColor.colorF5F5F7,
          ),
          Container(
            child: Padding(
              padding: EdgeInsets.only(left: 20,right: 20),
              child: Row(
                children: [
                  Container(
                    child: Stack(
                      children: [
                        Container(
                          child: Padding(
                            padding: EdgeInsets.only(top: 10),
                            child: Container(
                              color: YBColor.commonThemeColor,
                              height: 10,
                              width: 58,
                            ),
                          ),
                        ),
                        Container(
                          child: Text(
                            '补充更多',
                            style: YBTextStyle.TextStyle18181815Medium,
                          ),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    width: 12,
                  ),
                  Expanded(
                    child: Text(
                      '选填信息，以便接单者了解更多信息，减少沟通',
                      style: YBTextStyle.TextStyle7A7A7A12,
                    ),
                  ),
                ],
              ),
            ),
          ),
          Container(
            height: 56,
            child: InkWell(
              child: Padding(
                padding: EdgeInsets.only(left: 15,right: 15),
                child: Row(
                  children: [
                    Container(
                      child: Image.asset(YBImageStyle.getImagePath('lawyer_miaosuxuqiuImage')),
                    ),
                    Expanded(
                      child: Text(
                        '需求描述',
                        style: YBTextStyle.TextStyle48484814,
                      ),
                    ),
                    Container(
                      child: Text(
                        miaoShuStr != null?'已填写':"去填写",
                        style: YBTextStyle.TextStyle48484814,
                      ),
                    ),
                    Container(
                      width: 8,
                    ),
                    Container(
                      child: Image.asset(YBImageStyle.getImagePath('findIconArrowRight')),
                    ),
                  ],
                ),
              ),
              onTap: () async {
                YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage/homePagesShangWuFaLxXingZhengMiShuMiaoShuXuQiuPage');
              },
            ),
          ),
          Container(
            child: Padding(
              padding: EdgeInsets.only(left: 20,right: 20),
              child: Container(
                height: 1,
                color: YBColor.colorF5F5F7,
              ),
            ),
          ),
          Container(
            height: 56,
            child: InkWell(
              child: Padding(
                padding: EdgeInsets.only(left: 15,right: 15),
                child: Row(
                  children: [
                    Container(
                      child: Image.asset(YBImageStyle.getImagePath('lawyerImage_shiwuimage')),
                    ),
                    Expanded(
                      child: Text(
                        '您的预算',
                        style: YBTextStyle.TextStyle48484814,
                      ),
                    ),
                    Container(
                      child: Text(
                        diStr != null?'$diStr-$gaoStr':"去填写",
                        style: YBTextStyle.TextStyle48484814,
                      ),
                    ),
                    Container(
                      width: 8,
                    ),
                    Container(
                      child: Image.asset(YBImageStyle.getImagePath('findIconArrowRight')),
                    ),
                  ],
                ),
              ),
              onTap: () async {
                YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage/homePagesShangWuFaLxXingZhengMiShuYuSuanPage');
              },
            ),
          ),
          Container(
            height: 56,
            child: InkWell(
              child: Padding(
                padding:EdgeInsets.only(left: 15,right: 15),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.start,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    Container(
                      child: Image.asset(YBImageStyle.getImagePath('lawyerImage_shiwuimage')),
                    ),
                    Expanded(
                      child: Text(
                        '您的行业',
                        style: YBTextStyle.TextStyle48484814,
                      ),
                    ),
                    Container(
                      child: Text(
                        hangYeStr??"去填写",
                        style: YBTextStyle.TextStyle48484814,
                      ),
                    ),
                    Container(
                      width: 8,
                    ),
                    Container(
                      child: Image.asset(YBImageStyle.getImagePath('findIconArrowRight')),
                    ),
                  ],
                ),
              ),
              onTap: () async {
                YBApplication.router.navigateTo(context, '/homePage/homePageshangwufalvxingzhengmishuPage/homePagesShangWuFaLxXingZhengMiShuNinDeHangYEPage');
              },
            ),
          ),
        ],
      ),
    );
  }
}


